<?php
/**
 * Created by PhpStorm.
 * User: mayn
 * Date: 2018/8/31
 * Time: 13:04
 */

namespace app\api\model;

use think\Model;

class Article extends Model
{
    public static function getArticleById($id) {
        return self::get($id);
    }
    public static function updateArticleById($data) {
        return self::update([
            'id' => $data['id'],
            'title' => $data['title'],
            'content' => $data['content'],
        ]);
    }
}